package com.lagou.edu.service;

import com.lagou.edu.dao.ResumeDao;
import com.lagou.edu.pojo.Resume;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by shixi  on 2020/10/8
 */
@Service
public class ResumeServiceImpl {

    @Autowired
    ResumeDao resumeDao;


    public List<Resume> findAll(){
        return resumeDao.findAll();
    }


    public Resume save(Resume resume){
        return saveResume(resume);
    }


    public void delete(Long id){
        resumeDao.deleteById(id);
    }


    private Resume saveResume(Resume resume) {
        return resumeDao.save(resume);
    }
}
